package com.ttxz.sample.db.dao

import androidx.room.*
import com.ttxz.sample.bean.BannerBean
import com.ttxz.sample.db.entity.BannerEntity

@Dao
interface BannerDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insert(bannerEntity:BannerEntity)

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insertList(bannerDaoList:List<BannerEntity>)

    @Query("SELECT * FROM T_BANNER")
    suspend fun queryAll():List<BannerEntity>

    @Delete
    suspend fun delete(vararg bannerEntity: BannerEntity):Int

    @Query("DELETE FROM T_BANNER")
    suspend fun deleteAll():Int


}